home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
os2
/
rexxgdb2.zip
/
G2Hi.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-08-10
|
3KB
|
89 lines
/* rexx */
signal on syntax name error
signal on halt name error
signal on failure name error
'@echo off'
'cls'
say
say 'G2Hi --- Testing REXXGDB2.DLL HTML image tag creator function'
say ' (G2HSelect2Img)'
say 'Simon Husin (husin@ibm.net)'
say 'Kent, Washington, U.S.A., Nov 1996 - Aug 1997'
say
sq5 = "SELECT picture from emp_photo where empno = '000130' and translate(photo_format) = 'GIF'"
sq6 = "Select firstnme||' '||midinit||' '||lastname from employee where empno = '000130'"
sq7 = "SELECT picture from emp_photo where empno = '000140' and translate(photo_format) = 'GIF'"
sq8 = "Select firstnme||' '||midinit||' '||lastname from employee where empno = '000140'"
htmlfn = 'G22HTML.HTM'
requestedrows = 9999999
nullchar = ''
varcharlen = ''
show_border = '1'
show_rownum = '1'
show_header = '1'
if rxfuncquery('g2LoadFuncs') then do
say
say 'Loading REXXGDB2 Functions...'
call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
say 'Result =' g2LoadFuncs()
end
say
say 'Connecting to SAMPLE database...'
say 'SQLCODE='g2connectshare('SAMPLE')
say
'@del' htmlfn '1>NUL 2>NUL'
call time 'R'
call g2h htmlfn, 1, '<FORM METHOD="POST">'
call g2h htmlfn, 1, '<CENTER><TABLE BORDER=10><TR><TD>'
call g2hselect2img htmlfn, , 'sq5', 'PHOTO5.GIF'
call g2h htmlfn, 1, '</TD></TR></TABLE></CENTER>'
call g2h htmlfn, 1, '<HR><P>'
call g2h htmlfn, 1, '<TABLE BORDER><TR><TD>'
call g2hselect2img htmlfn, , 'sq5', 'PHOTO5.GIF'
call g2h htmlfn, 1, '</TD></TR></TABLE>'
call g2h htmlfn, 1, '<HR>'
call g2hselect2img htmlfn, 1, 'sq5', 'PHOTO5.GIF'
call g2h htmlfn, 1, '<HR>'
call g2h htmlfn, 1, '<CENTER><TABLE BORDER=5><TR><TD>'
call g2hselect2img htmlfn, , 'sq7', 'PHOTO7.GIF', 'Photo1'
call g2h htmlfn, 1, '</TD></TR></TABLE></CENTER>'
call g2h htmlfn, 1, '<HR><P>'
call g2hselect2img htmlfn, 1, 'sq7', 'PHOTO7.GIF', 'Photo2'
call g2h htmlfn, 1, '<HR>'
call g2hselect2img htmlfn, 1, 'sq7', 'PHOTO7.GIF', 'Photo3', 'm'
call g2h htmlfn, 1, g2selectone('sq8')
call g2h htmlfn, 1, '<BR></FORM>'
elapse = time('E')
'@netscape file:///'htmlfn
/* '@explore -q' htmlfn */
say 'Execution time' elapse
say
say 'Commiting...'
call g2commit
return 0
error:
say 'Error detected at line' SIGL
return 10
syntax:
say 'Syntax error detected at line' SIGL
return 20